package com.qf.smsplatform.gateway.client;

import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;

/**
 * 调用缓存模块的controller,完成限流和费用回滚
 * @Author Sun
 * @Date 2021/7/6 15:53
 */
@FeignClient(value = "SMSPLATFORM-CACHE")
public interface CacheClient {

    //保存数据到Zset中
    @GetMapping("/cache/zsave/{key}")
    void zsave(@PathVariable String key, @RequestParam long time, @RequestParam String randomUUID);


    //增加
    @PostMapping("/cache/hincr/{key}/{field}/{value}")
    Long hincr(@PathVariable String key, @PathVariable String field, @PathVariable long value);
}
